package com.zh.study.controller;

import com.zh.study.pojo.UserEntity;
import com.zh.study.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: zhanghuan
 * @date: 2022/8/13 12:37
 * @description: create it
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/user")
    public List<UserEntity> getUsers() {
        return userService.getUsers();
    }
}
